<?php
/*  
  Copyright (c) 2010-02 SongCMS 
  SongCMS All Rights Reserved. 
  Support:www.SongCMS.com
  QQ:544255858   19951025
  Author:Song  Version:3.17
  Date:2010-08-12 09:28:32
*/

include_once('Admin.php');
$APFile = "../config/admin.ini.php";
if(!empty($_POST['AdminConfig'])){
	if(!@$fp = fopen($APFile,'w')) MsgBox(1,"没有写入 $APFile 的权限！","1"); //写入
	$fw = fwrite($fp,stripcslashes(trim($_POST['AdminConfig'])));
	fclose($fp);
	echo '<script type="text/javascript">parent.location.href="./";</script>';
	AdminLog(1,1,'修改系统高级参数设定，结果：操作成功！');
	MsgBox (1,'数据修改成功！','1');	
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="./images/adminstyle.css" rel="stylesheet" type="text/css" />
<link rel="Shortcut Icon" href="../favicon.ico">
<link rel="Bookmark" href="../favicon.ico">
<script src="../js/csshovernotie6.js" type="text/javascript"></script>
</head>

<body>
<br />
<table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#CCCCCC">
  <form id="form1" name="form1" method="post" action="">
  <tr>
    <td align="center" class="Main_Title">系统高级参数设定</td>
  </tr>
  <tr>
    <td height="20" align="center" bgcolor="#FFFFFF">
<textarea name="AdminConfig" wrap="off" style="width:96%; height:500px; border:1px #999 solid; color:#093; padding:12px; font-family:'新宋体', '宋体';"><?php
@$handle = fopen($APFile, "r");
@$contents = fread($handle,filesize($APFile));
echo htmlspecialchars($contents);
@fclose($handle); 
?></textarea><br /><br />
<input type="submit" name="button" id="button" value="修 改" class="submit" /><br /><br />
	</td>
  </tr>
</form>
  </table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="6">
	<tr class="Notodd">
		<td style="line-height:20px;">
重要：1、此功能只为方便网站前期调试及配置用，在网站正常开通后请在开始菜单及桌面快捷方式配置中关闭该功能。<br />
　　　2、修改前请先对 ../config/admin.ini.php 文件进行手动备份。<br />
　　　3、该操作直接对后台配置文件进行修改，修改出错会导致无法进入系统，必要时可手动还原 admin.ini.php 文件。<br />
　　　4、请不要对一般管理员开放此页修改权限。<br />
　　　5、对本系统不是很了解或没有一定程序基础的用户不建议修改此页。
		</td>
	</tr>
</table>  
</body>
</html>
